
<script setup lang="ts">
	import type { book } from '../../../types'
	defineProps<{
		bookDes:book
	}>()
	const close = () => {
		emit('close')
	}
	const emit = defineEmits(['close'])
</script>

<template>
	<view class="service-panel">
		<!-- 关闭按钮 -->
		<text class="close" @click="close">X</text>
		<!-- 标题 -->
		<view class="title">价格明细</view>
		<!-- 内容 -->
		<view class="content">
			<view class="item">
				<view class="dt">1晚房价</view>
				<view class="dd">{{bookDes.currency}}{{bookDes.bookedNights[0].price}}</view>
			</view>
			<view class="item">
				<view class="dt">税及服务费</view>
				<view class="dd">{{bookDes.currency}}{{bookDes.taxServiceFee}}</view>
			</view>
			<!-- <view class="item">
				<view class="dt">积分</view>
				<view class="dd">0分</view>
			</view> -->
			<view class="item">
				<view class="dt">总额</view>
				<view class="dd price">{{bookDes.currency}}{{bookDes.totalAmount}}</view>
			</view>
		</view>
	</view>
</template>

<style lang="scss">
	.service-panel {
		padding: 0 30rpx;
		border-radius: 10rpx 10rpx 0 0;
		position: relative;
		background-color: #fff;
	}
	.title {
		line-height: 1;
		padding: 40rpx 0;
		text-align: center;
		font-size: 32rpx;
		font-weight: normal;
		border-bottom: 1rpx solid #ddd;
		color: #444;
	}

	.close {
		position: absolute;
		right: 24rpx;
		top: 24rpx;
	}

	.content {
		padding-bottom: 100rpx;

		.item {
			display: flex;
			justify-content: space-between;
			padding: 20rpx;
			border-bottom: 1px solid #eee;
		}

		.dt {
			margin-bottom: 10rpx;
			font-size: 28rpx;
			color: #333;
			font-weight: 500;
		}

		.dd {
			line-height: 1.6;
			font-size: 26rpx;
			color: #999;
		}
		.price{
			color: #f97316;
			font-size: 32rpx;
			font-weight: 500;
		}
	}
</style>